package unit3;

public class Employee {
    private String name;
    private double salary;

    Employee() {
        name = "无名氏";
        salary = 10000;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
    public void setSalary(double salary) {
        if (salary >= 10000) {
            this.salary = salary;
        } else {
            System.out.println("工资不能低于10000");
            this.salary = 10000;
        }
    }
    public double getSalary() {
        return salary;
    }
}
